--[[
	TODO
	-- 45
		Staggering shout
		Piercing Howl
		Disrupting shout
	-- 75
		Mass Spell Reflection
		Safeguard
		Vigilance
	-- 90
		Avatar
		Bloodbath
		Storm Bolt

]]
function ccR_Warrior_Enraged_Regeneration(specNumber)
	if specNumber == nil then specNumber = ccrPlayerSpec() end
	local UseAbility = ccRS["Warrior_" .. specNumber .. "_UseEnragedRegeneration"]
	local Health = ccRS["Warrior_" .. specNumber .. "_EnragedRegenerationHP"]
	if UseAbility
	and ccrPlayerHasTalent(ENRAGED_REGENERATION)
	and ccrPlayerHealth() <= Health
	and ccrSpellIsReady(ENRAGED_REGENERATION)
	then
		ccrCast(ENRAGED_REGENERATION)
		return
	end
end

function ccR_Warrior_Staggering_Shout()
	--if specNumber == nil then specNumber = ccrPlayerSpec() end
	--local UseAbility = ccRS["Warrior_" .. specNumber .. "_UseStaggeringShout"]
end

function ccR_Warrior_Piercing_Howl()
	if specNumber == nil then specNumber = ccrPlayerSpec() end
	local UseAbility = ccRS["Warrior_" .. specNumber .. "_UsePiercingHowl"]
end

function ccR_Warrior_Disrupting_Shout()
	--	if specNumber == nil then specNumber = ccrPlayerSpec() end
	--	local UseAbility = ccRS["Warrior_" .. specNumber .. "_UseDisruptingShout"]
end
function ccR_Warrior_Bladestorm(specNumber)
	if specNumber == nil then specNumber = ccrPlayerSpec() end
	local UseAbility = ccRS["Warrior_" .. specNumber .. "_UseBladestorm"]
	local Enemies = ccRS["Warrior_" .. specNumber .. "_BladestormCount"]
	if UseAbility
	and ccrPlayerHasTalent(BLADESTORM)
	and ccrSpellIsReady(BLADESTORM)
	and #tblPGetMeleeEnemies >= Enemies
	then
		ccrCast(BLADESTORM)
		return
	end
	return
end
function ccR_Warrior_Shockwave(specNumber)
	if specNumber == nil then specNumber = ccrPlayerSpec() end
	local UseAbility = ccRS["Warrior_" .. specNumber .. "_UseShockwave"]
	local Enemies = ccRS["Warrior_" .. specNumber .. "_ShockwaveCount"]
	if UseAbility
	and ccrPlayerHasTalent(SHOCKWAVE)
	and ccrSpellIsReady(SHOCKWAVE)
	and #tblPGetMeleeEnemies >= Enemies
	then
		ccrCast(SHOCKWAVE)
		return
	end
	return
end
function ccR_Warrior_Dragon_Roar(specNumber)
	if specNumber == nil then specNumber = ccrPlayerSpec() end
	local UseAbility = ccRS["Warrior_" .. specNumber .. "_UseDragonRoar"]
	local Enemies = ccRS["Warrior_" .. specNumber .. "_DragonRoarCount"]
	if UseAbility
	and ccrPlayerHasTalent(DRAGON_ROAR)
	and ccrSpellIsReady(DRAGON_ROAR)
	and #tblPGetMeleeEnemies >= Enemies
	then
		ccrCast(DRAGON_ROAR)
		return
	end
	return
end

function ccR_Warrior_Avatar(specNumber)
	if specNumber == nil then specNumber = ccrPlayerSpec() end
	local vUseTalent = ccRS["Warrior_" .. specNumber .. "_UseAvatar"]
	if vUseTalent
	and ccrPlayerHasTalent(AVATAR)
	and ccrSpellIsReady(AVATAR)
	and ccrPlayerIsInCombat()
	and ccrTargetIsWithinMeleeRange()
	then
		ccrCast(AVATAR)
		return
	end
	return
end

function ccR_Warrior_Bloodbath(specNumber)
	if specNumber == nil then specNumber = ccrPlayerSpec() end
	local vUseTalent = ccRS["Warrior_" .. specNumber .. "_UseBloodbath"]
	if vUseTalent
	and ccrPlayerHasTalent(BLOODBATH)
	and ccrSpellIsReady(BLOODBATH)
	and ccrPlayerIsInCombat()
	and ccrTargetIsWithinMeleeRange()
	then
		ccrCast(BLOODBATH)
		return
	end
	return
end

function ccR_Warrior_Storm_Bolt(specNumber)
	if specNumber == nil then specNumber = ccrPlayerSpec() end
	local vUseTalent = ccRS["Warrior_" .. specNumber .. "_UseStorm_Bolt"]
	if vUseTalent
	and ccrPlayerHasTalent(STORM_BOLT)
	and ccrSpellCanAttack(STORM_BOLT)
	then
		ccrCast(STORM_BOLT)
		return
	end
	return
end